package com.aistar.service;

import com.aistar.pojo.Question;
import com.aistar.pojo.Tracomm;
import com.aistar.pojo.TravelCompletely;
import com.aistar.pojo.Travelnote;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TravelnoteService {

    //查看某一游记的信息
    public TravelCompletely getbyId(int id);

    //分页查询所有游记按点赞数量降序排序
    public PageInfo<Travelnote> getAll(int pageNum, int pageSize);

    //分页查询所有游记按时间顺序升序排序
    public PageInfo<Travelnote> getAllfromdata(int pageNum, int pageSize);

    //查询游记前5条记录渲染到首页上
    public List<Travelnote> getfivetravel();

    //添加记录到游记表中
     public int saveOneTravel(Travelnote travelnote);

     //添加记录到问表中
    public int saveOneQues(Question question);

    //游记中添加评论
    public int savetracomm(Tracomm tracomm);

    //通过用户id查找游记
    public List<Travelnote> getByuserid(int id);


}
